package com.example.stroebackstage.service;



import com.example.stroebackstage.dao.OrderDao;

import com.example.stroebackstage.entity.Order;
import java.util.ArrayList;

public class OrderService {
    public ArrayList<Order> selectAll(){
        return OrderDao.selectOrder();
    }
    public ArrayList<Order> selectById(int id){
        return OrderDao.selectOrderById(id);
    }
    public ArrayList<Order> selectByCommodityId(int id){
        return OrderDao.selectOrderByCommodityId(id);
    }
    public ArrayList<Order>selectByCustomerEmail(String email){
        return OrderDao.selectOrderByCustomerEmail(email);
    }
    public boolean del(int id){return OrderDao.delOrder(id);}
    public boolean updateOrder(Order order){
        return OrderDao.updateOrder(order);}
    public boolean insert(Order order){
        return OrderDao.insertOrder(order);}

}
